<template>
	<view>
		<uni-group>
			<uni-card :title="item.title" v-for="(item,index) in xin" :thumbnail="base+item.cover" >
				<view class=""  v-html="filler(item.content)">
				</view>
				<view class="">
					评论数：{{item.commentNum}}
				</view>
				<view class="">
					发布时间：{{item.publishDate}}
				</view>
			</uni-card>
		</uni-group>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				base:'',
				xin:[]
			}
		},
		onLoad(options) {
			this.base = uni.getStorageSync('serIP')
			this.getlun5(options.value)
		},
		methods: {
			filler(str){
				return str.length>16?str.substring(0,14)+'...':str
			},
			getlun5(name){
				this.$get(this.base+'/prod-api/press/press/list',{
					title:name,
				}).then((res)=>{
					this.xin = res.rows		
					console.log(res.rows)	
				})
			},
		}
	}
</script>

<style>

</style>
